import axios from "axios";

export function postsDetail(id:any){
  return axios({
    url:"/api/editorDetail",
    method:"get",
    params:{id}
  })
}

interface editorState{
    ipt:string,
    text:string,
    id:any
}
export function editor(data:editorState){
  return axios({
    url:'/api/editorList',
    method:"post",
    data
  })
}
interface addeditorState{
  ipt:string,
  text:string
}
export function addEditor(data:addeditorState){
  return axios({
    url:"/api/addEditor",
    method:"put",
    data
  })
}